﻿using System.Drawing;
using System.Drawing.Drawing2D;

namespace MassIntellect.Drawing.Shapes
{
	public class Rectangle : Shape
	{
		#region Свойства

		public override GraphicsPath GraphicsPath
		{
			get
			{
				var grp = new GraphicsPath();
				grp.AddRectangle(new RectangleF(X, Y, Width, Height));
				return grp;
			}
		}

		#endregion

		#region Методы

		public override object Clone()
		{
			var sh = base.Cloning<Rectangle>();
			return sh;
		}

		public override bool Contains(PointF pnt)
		{
			return Bounds.Contains(pnt);
		}

		public override string ToString()
		{
			return string.Format("Прямоугольник({0},{1})", X, Y);
		}

		#endregion
	}
}